<script setup lang="ts">
import { h } from 'vue';
import { PlusOutlined } from '@vicons/antd';
import ProTable from '@/components/ProTable';

const columns = [
  {
    title: 'id',
    key: 'id',
    width: 100,
    render: () =>
      h(
        'div',
        {
          style: { color: 'red' },
        },
        '12'
      ),
  },
  {
    title: '名称',
    key: 'name',
    width: 100,
  },
];

const loadList = async (res: any) => {
  console.log(res, '123');
  // const result = await getTableList({ ...formParams, ...params.value, ...res });
  return {
    data: [{}, {}],
    total: 20,
  };
};

const reloadTable = () => { };
</script>
<template>
  <div>
    <n-card :bordered="false" class="proCard">
      <ProTable :columns="columns" :request="loadList" :search="false" title="用户列表">
        <template #toolbar>
          <n-button type="primary" @click="reloadTable">刷新数据</n-button>
        </template>
      </ProTable>
    </n-card>
  </div>
</template>

<style scoped lang="less"></style>
